package cn.doitedu.day08

import org.apache.spark.sql.SparkSession

/**
 * Spark开启对Hive的支持，即使用hive的元数据库
 */
object T06_EnableHiveSupportDemo {

  def main(args: Array[String]): Unit = {

    val spark = SparkSession.builder().appName("EnableHiveSupportDemo")
      .master("local[*]")
      .enableHiveSupport() //开启对Hive的支持
      .getOrCreate()

    val df = spark.sql("select * from doit42.dwd_app_log_id_mapping limit 10")

    df.show()

  }

}
